﻿using DTOs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Domain.Service.Interfae
{
    public interface ILeaveService
    {
        /// <summary>
        /// 添加请假信息
        /// </summary>
        /// <param name="leave"></param>
        /// <returns></returns>
        Task<int> AddLeave(Leave leave);
        /// <summary>
        /// 显示请假信息
        /// </summary>
        /// <returns></returns>
        Task<PageDto<Leave>> GetLeavesList(string names,int pageSize, int pageIndex,string? Sdate,string? Edate,string? Lnames);
        /// <summary>
        /// 删除请假信息
        /// </summary>
        /// <param name="leaveId"></param>
        /// <returns></returns>
        Task<int> DelLeave(Leave leave);
        /// <summary>
        /// 反填请假信息
        /// </summary>
        /// <param name="leaveId"></param>
        /// <returns></returns>
        Task<Leave> GetLeaveById(int leaveId);
        /// <summary>
        /// 修改请假信息
        /// </summary>
        /// <param name="leave"></param>
        /// <returns></returns>
        Task<int> UpdateLeave(Leave leave);
        /// <summary>
        /// 审批请假信息
        /// </summary>
        /// <param name="lid"></param>
        /// <param name="sart"></param>
        /// <param name="approseIsno"></param>
        /// <returns></returns>
        Task<int> UpdateSart(int lid, bool sart,string? approseIsno);
    }
}
